<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Home</title>
        <?php
        echo "<link href='" . base_url() . "media/css/main.css' rel='stylesheet' type='text/css'/>";
//        echo "<script src='" . base_url() . "media/js/jquery-1.7.2.js' type='text/javascript' ></script>";
        ?>
<!--        <script type="text/javascript">
            $(document).ready(function(){
                $(".stripeMe tr").mouseover(function(){$(this).addClass("over");}).mouseout(function(){$(this).removeClass("over");});
                $(".stripeMe tr:even").addClass("alt");
            });
        </script>-->
        <script type="text/javascript">
            var Event = {
                add: function(obj,type,fn) {
                    if (obj.attachEvent) {
                        obj['e'+type+fn] = fn;
                        obj[type+fn] = function() { obj['e'+type+fn](window.event); }
                        obj.attachEvent('on'+type,obj[type+fn]);
                    } else
                        obj.addEventListener(type,fn,false);
                },
                remove: function(obj,type,fn) {
                    if (obj.detachEvent) {
                        obj.detachEvent('on'+type,obj[type+fn]);
                        obj[type+fn] = null;
                    } else
                        obj.removeEventListener(type,fn,false);
                }
            }

            function $() {
                var elements = new Array();
                for (var i=0;i<arguments.length;i++) {
                    var element = arguments[i];
                    if (typeof element == 'string') element = document.getElementById(element);
                    if (arguments.length == 1) return element;
                    elements.push(element);
                }
                return elements;
            }

            String.prototype.trim = function() {
                return this.replace(/^\s+|\s+$/,"");
            }

            function addClassName(el,className) {
                removeClassName(el,className);
                el.className = (el.className + " " + className).trim();
            }

            function removeClassName(el,className) {
                el.className = el.className.replace(className,"").trim();
            }

            var ZebraTable = {
                bgcolor: '',
                classname: '',
                stripe: function(el) {
                    if (!$(el)) return;
                    var rows = $(el).getElementsByTagName('tr');
                    for (var i=1,len=rows.length;i<len;i++) {
                        if (i % 2 == 0) rows[i].className = 'alt';
                        Event.add(rows[i],'mouseover',function() { ZebraTable.mouseover(this); });
                        Event.add(rows[i],'mouseout',function() { ZebraTable.mouseout(this); });
                    }
                },
                mouseover: function(row) {
                    this.bgcolor = row.style.backgroundColor;
                    this.classname = row.className;
                    addClassName(row,'over');
                },
                mouseout: function(row) {
                    removeClassName(row,'over');
                    addClassName(row,this.classname);
                    row.style.backgroundColor = this.bgcolor;
                }
            }

            window.onload = function() {
                ZebraTable.stripe('mytable');
            }
        </script>
    </head>
    <body id="bd">
        <div id="header">
            <div class="ban">
                <div class="logo"></div>
                <div class="title">
                    <h1>Kelurahan Tegaltirto, Berbah, Sleman</h1>
                </div>
            </div>
        </div>
        <div id="topnav"></div>
        <div id="content">
            <div class="leftnav">
                <ul>
                    <li><?php echo anchor('main/home', 'Home') ?></li>
                    <li><?php echo anchor('main/agama', 'Agama') ?></li>
                    <li><?php echo anchor('main/agama', 'Jenis Kelamin') ?></li>
                    <li><?php echo anchor('main/agama', 'Kewarganegaraan') ?></li>
                    <li><?php echo anchor('main/agama', 'Pekerjaan') ?></li>
                    <li><?php echo anchor('main/agama', 'Pendidikan') ?></li>
                    <li><?php echo anchor('main/agama', 'Perkawinan') ?></li>
                    <li><?php echo anchor('main/agama', 'Kartu Keluarga') ?></li>
                    <li><?php echo anchor('main/penduduk', 'Penduduk') ?></li>
                    <li><?php echo anchor('main/agama', 'Surat-surat') ?></li>
                    <li><?php echo anchor('main/agama', 'Statistik') ?></li>
                </ul>
            </div>
            <div class="container">
                <div class="add">
                    <?php echo form_open() ?>
                    <label>Agama</label><input type="text"/>
                    <input type="submit" value="" class="tambah"/>
                    <?php echo form_close() ?>
                </div>
                <div class="tabel">
                    <table>
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>Agama</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>1</td>
                                <td>Islam</td>
                                <td><?php echo anchor('', 'Perbarui') ?> | <?php echo anchor('', 'Hapus') ?></td>
                            </tr>
                            <tr>
                                <td>2</td>
                                <td>Kristen</td>
                                <td><?php echo anchor('', 'Perbarui') ?> | <?php echo anchor('', 'Hapus') ?></td>
                            </tr>
                            <tr>
                                <td>3</td>
                                <td>Katolik</td>
                                <td><?php echo anchor('', 'Perbarui') ?> | <?php echo anchor('', 'Hapus') ?></td>
                            </tr>
                            <tr>
                                <td>4</td>
                                <td>Hindu</td>
                                <td><?php echo anchor('', 'Perbarui') ?> | <?php echo anchor('', 'Hapus') ?></td>
                            </tr>
                            <tr>
                                <td>5</td>
                                <td>Budha</td>
                                <td><?php echo anchor('', 'Perbarui') ?> | <?php echo anchor('', 'Hapus') ?></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div id="footer">
            <div class="footit">
                <h5>Copyright © <?php echo date('Y') ?> Kelurahan Tegaltirto, Berbah, Sleman</h5>
            </div>
        </div>
    </body>
</html>
